﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;
using LogisticsDAL;
using System.Data.SqlClient;
using Model;

namespace LogisticsBLL
{
    public class CostBLL
    {
        public DataTable CostCarries(int pageIndex, int pageSize, out int Recout, int FindState, string RecoutTime, string EndRescoutTime)
        {
            CostDAL ct = new CostDAL();
            return ct.CarriesASching(pageIndex, pageSize, out Recout, FindState, RecoutTime, EndRescoutTime);
        }


        public int Cost( float OilCost, float Toll, float Fine, float OtherCost,int carrid)
        {
            CostDAL ct = new CostDAL();
            return ct.Cost(OilCost,Toll,Fine,OtherCost,carrid);
        }



        public int Update(int Carrid, float OilCost, float Toll, float Fine, float OtherCost)
        {
            CostDAL ct = new CostDAL();
            int num = ct.Update(Carrid, OilCost, Toll, Fine, OtherCost);
            return num;
        }


        public SqlDataReader BindCostRead(int carrid)
        {
            CostDAL ct = new CostDAL();

            SqlDataReader read = ct.BindCostRead(carrid);

            return read;
        }


        public DataTable tabmakeExcel(string TeamName, DateTime RecDate, DateTime ReceDateEnd)
        {
            CostDAL ct = new CostDAL();
            return ct.sqlMakeReport(TeamName, RecDate, ReceDateEnd);
        }


        public Seching GetCost(int schingID)
        {
            CostDAL cost = new CostDAL();
            return cost.GetCost(schingID);
        }
    }
}
